package com.controller;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import com.common.util.IPInterceptor;

@Configuration
public class InterceptorConfig  implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new IPInterceptor()).addPathPatterns("/**");
        /**
         * 指定拦截的相关请求接口
         */
        //registry.addInterceptor(new ParamInterceptor()).addPathPatterns("/data/wuc/**");
    }

}
